//Eg5-14.cpp
#include <iostream>
using namespace std;
class A{
public: 
    void f(){}
};
class B:public A{};
void main(){
    A a,*pA;
    B b;
    a=b; pA=&b; 
    A &rA=b;
    cout<<"1: "<<typeid(a).name()<<endl;
    cout<<"2: "<<typeid(*pA).name()<<endl;
    cout<<"3: "<<typeid(rA).name()<<endl;
}
